package com.company.decorative;


public class Fans implements Materials {

    Materials materials = null;
    int price;

    public Fans() {
        this.price = 5;
    }

    @Override
    public void addComponent(Materials materials) {
        this.materials = materials;

    }

    @Override
    public int getPrice() {
        int materialsPrice = 0;
        if (materials != null) {
            materialsPrice = materials.getPrice();
        }
        return materialsPrice + this.price;
    }

}
